<?php
/**
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake.libs.view.templates.layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

//Check if current page is homepage
$is_home = false;
if($this->params['controller']=='pages' && $this->params['action']=='display' && $this->params['pass'][0]=='home') {
	$is_home = true;
}

//Check if user is visiting from browse guide tab
$url=explode('/',$this->params['url']['url']);
//pr($this->params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Coniditional CSS Hacks for IE. -->
<!--[if lt IE 8 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie"> <![endif]-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!--============================ HEAD ============================-->
<head>
	<?php echo $this->Html->charset(); ?>
    <!-- Force latest IE rendering engine (even in intranet) & Chrome Frame -->
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<title>
		<?php __('MyGuide'); ?> - 
		<?php echo $title_for_layout; ?>
	</title>
    <!--  Mobile viewport optimized -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css('http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold');
		echo $this->Html->css('style');
		echo $this->Html->script('modernizr-2.0.6.src');
		echo $this->Html->script('jquery-1.6.4.min');
	?>
</head>
<!--============================ BODY ============================-->
<body class="<?php echo $is_home ? 'home_page' : '';?> <?php echo $this->params['controller']; ?>_<?php echo $this->params['action']; ?> <?php echo $url[0]; ?>">
<!--============================ MAIN WRAPPER - required for sticky footer ============================-->
<div class="wrapper">
  <header>
    <div class="container_12">
      <h1><?php echo $this->Html->link(__('My Guide', true), '#', array('escape' => false, 'class' => 'logo ir')); ?></h1>
      
      <!--========= TOP NAVIGATION  =========-->
      <div class="tar clearfix"><?php echo $this->Html->link(__('Sign Up', true), '#', array('escape' => false)); ?> or 
        <button class="button blue_w_arrow margin10left"><?php __('Login Here'); ?></button>
      </div>
      
      <!--========= MAIN NAVIGATION  =========-->
      <nav class="clearfix main_nav"> 
        <!--========= SEARCH  =========-->
        <div class="header_search">
          <?php echo $this->Form->create('Search');?>
          	<?php echo $this->Form->input('name', array('div' => false, 'label' => false, 'placeholder' => __('Search', true))); ?>
            <?php echo $this->Html->image('/images/nav_search_icon.png', array('alt'=> __('Submit', true), 'border' => '0')); ?>
          <?php echo $this->Form->end(); ?>
          
        </div>
        <ul>
          <li><?php echo $this->Html->link(__('Home', true), '/home/', array('escape' => false, 'id' => 'home')); ?></li>
          <li><?php echo $this->Html->link(__('My Guides', true), '/guides', array('escape' => false, 'id' => 'guides')); ?></li>
          <li><?php echo $this->Html->link(__('My Venues', true), '/venues', array('escape' => false, 'id' => 'venues')); ?></li>
          <li><?php echo $this->Html->link(__('Requests', true), '/requests', array('escape' => false, 'id' => 'requests')); ?></li>
          <li><?php echo $this->Html->link(__('Browse Guides', true), '/browse/guides', array('escape' => false, 'id' => 'browse')); ?></li>
        </ul>
      </nav>
      <?php 
	  //Homepage only section
	  if($is_home): ?>
      <div class="iphone_bg">
        <div class="left_column">
          <div class="tac">
            <h1><strong><?php __('My Guide Helps You') ?></strong></h1>
            <ul class="primary_actions">
              <li class="create ir"><?php echo $this->Html->link(__('Create', true), '#', array('escape' => false)); ?></li>
              <li class="request ir"><?php echo $this->Html->link(__('Request', true), '#', array('escape' => false)); ?></li>
              <li class="share ir"><?php echo $this->Html->link(__('Share', true), '#', array('escape' => false)); ?></li>
            </ul>
            <?php echo $this->Html->link(
					$this->Html->image('/images/watch_video_tut.png', array('alt'=> __('MyGuide Video Tutorial', true), 'border' => '0','width' => '267','height' => '43')),
					'#',
					array('escape' => false)
				);
			?>
            <hr class="margin10top margin10bottom">
              <div class="grid_6 tal">
                <h5><?php __('Create a Guide') ?></h5>
                <?php echo $this->Form->create('Guide');?>
                <?php echo $this->Form->input('Guide.title', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Title', true), 
															'class' => 'large')); ?>
				<?php echo $this->Form->input('Guide.description', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Details', true), 
															'class' => 'large margin10top',
															'type' => 'textarea',
															'rows' => 3)); ?>
				<?php echo $this->Form->input('Guide.destination', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Destination', true), 
															'class' => 'large margin10top')); ?>
                <button class="button cyan_w_arrow margin10top"><?php __('Create Guide') ?></button>
                <?php echo $this->Form->end(); ?>
              </div>
              <div class="grid_5 tal  push_1">
                <h5><?php __('Request a Guide') ?></h5>
                <?php echo $this->Form->create('Request');?>
                <?php echo $this->Form->input('Request.title', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Title', true), 
															'class' => 'large')); ?>
				<?php echo $this->Form->input('Request.destination', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Destination', true), 
															'class' => 'large margin10top')); ?>
                <button class="button cyan_w_arrow margin10top"><?php __('Request Guide') ?></button>
                <?php echo $this->Form->end(); ?>
              </div>
          </div>
        </div>
        <div class="sign_up clearfix">
          <?php echo $this->Form->create('User');?>
            <h3><?php __('Sign up now') ?> <small> - <?php __('It\'s free!') ?></small></h3>
            <?php echo $this->Form->input('User.email', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Email Address', true), 
															'class' => 'large margin10right')); ?>
            <?php echo $this->Form->input('User.name', array('div' => false, 
															'label' => false, 
															'placeholder' => __('Full Name', true), 
															'class' => 'large')); ?>
            <div> <span class="fr margin20top"><?php __('Already a Member?', true) ?> <?php echo $this->Html->link(__('Login Here', true), '#', array('escape' => false)); ?></span>
			<button class="button cyan_w_arrow large"><?php __('Sign Up Now') ?></button>
            </div>
            <?php echo $this->Form->end(); ?>

          
          <div class="iphone">
            <h3><?php __('MyGuide also works on your iPhone') ?></h3>
            <ul class="bulleted_list2">
              <li><?php __('Get your friends on the go') ?></li>
              <li><?php __('Add your own venues from where you are') ?></li>
              <li><?php __('Browse guides near you') ?></li>
            </ul>
            <p><?php echo $this->Html->link(
					$this->Html->image('/images/available_app_store.png', array('alt'=> __('Available on App Store', true), 'border' => '0','width' => '124','height' => '41')),
					'#',
					array('escape' => false)
				);
			?></p>
          </div>
        </div>
        <div class="clear"></div>
      </div>
      <?php 
	  //Homepage only section end
	  endif; ?>
    </div>
  </header>
</div>
<!-- end of main wrapper -->

<!--============================ CONTENT AREA ============================-->
<div class="content_area">
  <div class="container_12 <?php echo $is_home ? 'clearfix' : '';?>">
	<?php echo $this->Session->flash(); ?>
    <?php echo $content_for_layout; ?>
  </div>
</div>

<!--============================ FOOTER ============================-->
<div class="footer">
  <div class="container_12 clearfix">
    <section class="clearfix">
      <div class="grid_3">
        <h4><?php __('From The Blog') ?>:</h4>
        <ul class="bulleted_list bordered_list">
          <li><?php echo $this->Html->link(__('Forget planes and cars: beginner', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('Cities which define our age', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('The world\'s 10 best parks and', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('World\'s best slow travel', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('9 iconic sporting events', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('The world\'s 10 best parks and', true), '#', array('escape' => false)); ?></li>
        </ul>
      </div>
      <div class="grid_3 push_1">
        <h4><?php __('Navigation') ?>:</h4>
        <ul class="bordered_list">
          <li><?php echo $this->Html->link(__('Home', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('My Guides', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('My Venues', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('Request', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('Browse Guides', true), '#', array('escape' => false)); ?></li>
          <li><?php echo $this->Html->link(__('Contact Us', true), '#', array('escape' => false)); ?></li>
        </ul>
      </div>
      <div class="grid_4 push_2">
        <h4><?php __('Get in Touch') ?>:</h4>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus blandit quam at leo porta ullamcorper. Sed elementum, tellus et venenatis tempus, augue dui porttitor odio, ut semper nibh neque a magna.</p>
      </div>
    </section>
    <hr class="clear"/>
    	&copy; <?php __('Copyright 2011-2012 MyGuide') ?>
        <span class="fr">
        	<?php echo $this->Html->link(
					$this->Html->image('/images/facebook.jpg', array('alt'=> __('Facebook', true), 'border' => '0','width' => '20','height' => '20')),
					'#',
					array('escape' => false)
				);
			?>
            <?php echo $this->Html->link(
					$this->Html->image('/images/yahoo.jpg', array('alt'=> __('Yahoo!', true), 'border' => '0','width' => '20','height' => '20')),
					'#',
					array('escape' => false)
				);
			?>
            <?php echo $this->Html->link(
					$this->Html->image('/images/gmail.jpg', array('alt'=> __('Google Mail!', true), 'border' => '0','width' => '20','height' => '20')),
					'#',
					array('escape' => false)
				);
			?>
            <?php echo $this->Html->link(
					$this->Html->image('/images/live.jpg', array('alt'=> __('MSN Live Mail', true), 'border' => '0','width' => '20','height' => '20')),
					'#',
					array('escape' => false)
				);
			?>
        </span>
 </div>
</div>
<?php echo $this->element('sql_dump'); ?>
<?php
//Jquery tools from CDN for faster loading. fall back to local if necessary

// Jquery tools, Uniform JS, CAROUSEL, CONFIGURATION
echo $this->Html->script(array('jquery.tools.min','jquery.uniform.min','jcarousellite_1.0.1.min','script'));

// Other Scripts
echo $scripts_for_layout;
?>
</body>
</html>